package com.imooc.imoocbilibili.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.imooc.imoocbilibili.entity.UserCoin;
import com.imooc.imoocbilibili.mapper.UserCoinMapper;
import com.imooc.imoocbilibili.service.UserCoinService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service("userCoinService")
@RequiredArgsConstructor
public class UserCoinServiceImpl extends ServiceImpl<UserCoinMapper, UserCoin> implements UserCoinService {

    @Override
    public Page<UserCoin> queryPage(Integer pageNo, Integer pageSize) {
        Page<UserCoin> page = this.page(
                new Page<>(pageNo, pageSize),
                // 拼接查询条件
                new LambdaQueryWrapper<UserCoin>()
        );

        return page;
    }

}